package com.xhtt.modules.sys.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xhtt.modules.task.model.car.CarTaskUserStatus;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@TableName("sys_dept")
public class SysDeptEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    public static final String DEPTID = "dept_id";
    public static final String PARENTID = "parent_id";
    public static final String NAME = "name";
    public static final String TYPE = "type";
    public static final String ORDERNUM = "order_num";

    /**
     * 菜单ID
     */
    @TableId(type = IdType.AUTO)
    private Integer deptId;

    private String code;

    /**
     * 父菜单ID，一级菜单为0
     */
    @NotNull(message = "不能为空")
    private Integer parentId;

    @TableField(exist = false)
    private Integer pId;//

    /**
     * 父级名称
     */
    @TableField(exist = false)
    private String parentName;

    /**
     * 部门名称
     */
    private String name;

    @NotNull(message = "不能为空")
    private Integer type;//1-部门2-分组',

    /**
     * 排序
     */
    private Integer orderNum;

    private String memo;

    /**
     * ztree属性
     */
    @TableField(exist = false)
    private Boolean open;

    @TableField(exist = false)
    private List<?> list;

    @TableField(exist = false)
    private List<SysDeptEntity> children;

    @TableField(exist = false)
    private List<CarTaskUserStatus> carTaskUserStatusList;

    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 最后一次调整时间
     */
    private Date updateTime;
    /**
     * 创建者ID，人工系统创建为0
     */
    private Integer createUserId;
    /**
     * 最后一次调整者ID
     */
    private Integer updateUserId;


    /**
     * 设置：父菜单ID，一级菜单为0
     *
     * @param parentId 父菜单ID，一级菜单为0
     */
    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    /**
     * 获取：父菜单ID，一级菜单为0
     *
     * @return Long
     */
    public Integer getParentId() {
        return parentId;
    }

    /**
     * 设置：菜单名称
     *
     * @param name 菜单名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取：菜单名称
     *
     * @return String
     */
    public String getName() {
        return name;
    }


    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }


    /**
     * 设置：排序
     *
     * @param orderNum 排序
     */
    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    /**
     * 获取：排序
     *
     * @return Integer
     */
    public Integer getOrderNum() {
        return orderNum;
    }

    public List<?> getList() {
        return list;
    }

    public void setList(List<?> list) {
        this.list = list;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public Boolean getOpen() {
        return open;
    }

    public void setOpen(Boolean open) {
        this.open = open;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public List<SysDeptEntity> getChildren() {
        return children;
    }

    public void setChildren(List<SysDeptEntity> children) {
        this.children = children;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    public Integer getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    public Integer getpId() {
        return this.parentId;
    }

    public List<CarTaskUserStatus> getCarTaskUserStatusList() {
        return carTaskUserStatusList;
    }

    public void setCarTaskUserStatusList(List<CarTaskUserStatus> carTaskUserStatusList) {
        this.carTaskUserStatusList = carTaskUserStatusList;
    }
}
